package com.itheima.thread.blockingqueue.demo02;

import java.util.concurrent.ArrayBlockingQueue;

public class BoxDemo {

    public static void main(String[] args) {

        ArrayBlockingQueue<Box> arrayBlockingQueue = new ArrayBlockingQueue<Box>(1);

        ProducerThread producerThread = new ProducerThread(arrayBlockingQueue);

        CustomerThread customerThread = new CustomerThread(arrayBlockingQueue);

        Thread t1 = new Thread(producerThread);
        Thread t2 = new Thread(customerThread);

        t1.start();
        t2.start();

    }

}
